
<form id="form_edit"><input type="hidden" name="id" value="{[$smarty.request.id]}" />
<table>
	<tr>
		<td width="20%" align="right">流水号：</td>
		<td width="30%">{[$result.id]}（{[$result.oper_t]}）</td>
		<td width="20%" align="right">状态：</td>
		<td width="30%">{[$result.status_t]}</td>
	</tr>
	<tr>
		<td align="right">负责人：</td>
		<td><input type="text" name="emp" id="emp" size="16" value="{[$result.emp]}:{[$result.emp_t]}" title="{[$t.emp_|emp:'负责人']}"></td>
		<td align="right">日期：</td>
		<td><input type="text" name="date" id="date" size="16" value="{[$result.date]}"></td>
	</tr>
	<tr>
		<td align="right">编号：</td>
		<td><input type="text" name="code" size="16" value="{[$result.code]}"></td>
		<td align="right">分类：</td>
		<td><select name='machine1' id='machine1'>
			{[html_options options=$machine1_option selected=$result.machine1]}
		</select></td>
	</tr>
	<tr>
		<td align="right">名称：</td>
		<td><input type="text" name="name" size="16" value="{[$result.name]}"></td>
		<td align="right">品牌：</td>
		<td><select name='machine2' id='machine2'>
			{[html_options options=$machine2_option selected=$result.machine2]}
		</select></td>
	</tr>
	<tr>
		<td align="right">图片(150x150)：</td>
		<td colspan="3"><img src="{[$result.photo_t]}" alt="." />
		<input type="file" name="userfile" id="userfile" size="22"></td>
	</tr>
	<tr>
		<td align="right">备注：</td>
		<td colspan="3"><textarea rows="3" name="content" cols="55">{[$result.content]}</textarea></td>
	</tr>
	<tr>
		<td align="right">状态：</td>
		<td colspan="3"><select name='status'>
			{[html_options options=$status_option selected=$result.status]}
		</select></td>
	</tr>	
</table>
</form>

<script type="text/javascript"
	src="js/car/machine/injection/add.js?r={[$smarty.now]}"></script>
	
<script type="text/javascript">
$(function() {

	$("#userfile").uploadify({
		'swf'       : '/js/uploadify/uploadify.swf',
		'uploader' : 'car.php?do=Cnc.ajax_upload',
				
		'buttonText': '请选择文件',
		
		'width'          : 130,
		'queueSizeLimit' : 1,
		'auto'			 : false,
		'multi'          : false,
		'debug'			 : false,
		'removeTimeout'	 : 0.5,
		
		'fileTypeExts'	 : '*.jpg;*.png;',
		'fileTypeDesc'	 : 'All Files',
		'fileSizeLimit'	 : '10MB',
		'formData': {
			'id':	'{[$smarty.request.id]}',
			'oper':	'{[$smarty.session.id]}'
		},
		
		'onUploadSuccess':function(file, data, response) {
			$('#userfile').uploadify('upload');
			
			$("#dialog_edit").dialog("close");
		}
		
	});
	
});
</script>
